package cn.com.elite;

import java.io.ByteArrayOutputStream;  
import java.io.File;  
import java.io.IOException;  
import java.io.InputStream;  
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.apache.http.HttpResponse;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;

import sfmi.component.chnchannel.chncallcenter.ChnCallcenterVOCService;
import sfmi.component.chnchannel.chncallcenter.client.VOCClient;
import sfmi.component.chnchannel.chncallcenter.dto.common.Page;
import sfmi.component.chnchannel.chncallcenter.dto.enums.ConnectMode;
import sfmi.component.chnchannel.chncallcenter.dto.voc.VOCHistory;


public class EliteTest {
	public static void main(String[] args){
		String xml="";
		try{
			VOCClient vocClient = new VOCClient(ConnectMode.RealServer);
			Page page = new Page();
			page.setCurrentPage(1);
			page.setRowCntPerPage(10);
			HashMap condition = new HashMap<String, Object>();
			condition.put("carNo", "");
			condition.put("caprTelNo", "13601842275");
			condition.put("contorRecgNo","");	
			page.setCondition(condition);
			page=vocClient.findHistoryList4AutoCall(page);
			List<Object> list1=(List<Object>)page.getListData();
			System.out.println(list1.size());
			List<VOCHistory> list=(List<VOCHistory>)page.getListData();
			if(list!=null&&list.size()>0){
				for(int i=0;i<list.size();i++){
					VOCHistory vOCHistory=(VOCHistory)list.get(i);
					xml=xml+"<VOCHistory>";
					xml=xml+"<CaprRecgName>"+vOCHistory.getCaprRecgName()+"</CaprRecgName>";
					xml=xml+"<CaprRecgNo>"+vOCHistory.getCaprRecgNo()+"</CaprRecgNo>";
					xml=xml+"<CaprRecgNoTypeCd>"+vOCHistory.getCaprRecgNoTypeCd()+"</CaprRecgNoTypeCd>";
					xml=xml+"<ChnlCd>"+vOCHistory.getChnlCd()+"</ChnlCd>";
					xml=xml+"<ChnlNm>"+vOCHistory.getChnlNm()+"</ChnlNm>";
					xml=xml+"<ProcStatCd>"+vOCHistory.getProcStatCd()+"</ProcStatCd>";
					xml=xml+"<ProcStatNm>"+vOCHistory.getProcStatNm()+"</ProcStatNm>";
					xml=xml+"<RcivSeqNum>"+vOCHistory.getRcivSeqNum()+"</RcivSeqNum>";
					xml=xml+"<RelClerkNm>"+vOCHistory.getRelClerkNm()+"</RelClerkNm>";
					xml=xml+"<RelClerkNo>"+vOCHistory.getRelClerkNo()+"</RelClerkNo>";
					xml=xml+"<VocClsCd>"+vOCHistory.getVocClsCd()+"</VocClsCd>";
					xml=xml+"<VocClsNm>"+vOCHistory.getVocClsNm()+"</VocClsNm>";
					xml=xml+"<VocConts>"+vOCHistory.getVocConts()+"</VocConts>";
					xml=xml+"<VocTitle>"+vOCHistory.getVocTitle()+"</VocTitle>";
					xml=xml+"</VOCHistory>";
				}
			}else{
				System.out.println( "<null>null</null>");
			}
			
		}catch(Exception e){
			e.printStackTrace();
		}
		System.out.println(xml);
	}

}
